<?php
$this->breadcrumbs=array(
	'Galeria'=>array('index'),
	'Gerenciar',
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('tbl-galeria-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<?php echo CHtml::link('Busca avançada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'tbl-galeria-grid',
	'dataProvider'=>$model->search(),
    //    'cssFile'=>Yii::app()->request->baseUrl. '/themes/'.Yii::app()->theme->name.'/css/listas.css',
	'filter'=>$model,
	'columns'=>array(
		'id',
		'name',
                'id_author',
		'author',
		 array(
                    'name'=>'link',
                    'type'=>'image',
                    'value'=> 'Yii::app()->baseUrl.  "/images/" .$data->link',
                ),
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
